<%@ page language="java" pageEncoding="UTF-8"%>
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
<html>
	<head>
		<title>文件上传</title>
		<link href="css/oa.css" rel="stylesheet" type="text/css">
		<script type="text/javascript" src="js/fileupload/swfupload.js"></script>
		<script type="text/javascript" src="js/fileupload/handlers.js"></script>
		<script type="text/javascript">
			var swfu;
			window.onload = function () {
				swfu = new SWFUpload({
					upload_url: "fileUploadImg.action",
					post_params: {"name":"name"},
					file_post_name: "file",
					// File Upload Settings
					file_size_limit : "10 MB",	// 1000MB
					file_types : "*.jpg;*.jpeg;*.png;*.gif;*.bmp",
					file_types_description : "所有图片",
					file_upload_limit : "100000",
					file_queue_error_handler : fileQueueError,
					file_dialog_complete_handler : fileDialogComplete,//选择好文件后提交
					file_queued_handler : fileQueued,
					upload_progress_handler : uploadProgress,
					upload_error_handler : uploadError,
					upload_success_handler : uploadSuccess,
					upload_complete_handler : uploadComplete,
	
					// Button Settings
					button_image_url : "image/SmallSpyGlassWithTransperancy_17x18.png",
					button_placeholder_id : "spanButtonPlaceholder",
					button_width: 150,
					button_height: 18,
					button_text : "<span>文件(10MB Max)</span>",
					button_text_style : '.button { font-family: Helvetica, Arial, sans-serif; font-size: 12pt; } .buttonSmall { font-size: 10pt; }',
					button_text_top_padding: 0,
					button_text_left_padding: 18,
					button_window_mode: SWFUpload.WINDOW_MODE.TRANSPARENT,
					button_cursor: SWFUpload.CURSOR.HAND,
					
					// Flash Settings
					flash_url : "js/fileupload/swfupload.swf",
	
					custom_settings : {
						upload_target : "divFileProgressContainer"
					},
					// Debug Settings
					debug: false  //是否显示调试窗口
				});
			};
			function startUploadFile(){
				swfu.startUpload();
			}
			
			function test(){
				var val=document.getElementById("fileUpLoads").value;
				window.returnValue=val;
				window.close();
			}
		</script>
	</head>
<body  style="background-color: #C0D1E3; padding: 2px;">
<script type="text/javascript">
	window.onbeforeunload=function (){
			     var val=document.getElementById("fileUpLoads").value;
				window.returnValue=val;
		}
	</script>
<table width="100%" height="100%" border="0" cellspacing="5" cellpadding="0">
  <tr>
    <td height="100%" valign="top"><table width="100%" border="0" cellpadding="0" cellspacing="0">
      <tr>
        <td width="4"><img src="image/zz_title_left.gif" width="4" height="23"></td>
        <td width="9" height="23" background="image/zz_title_middle.gif"></td>
        <td background="image/zz_title_middle.gif" class="zz_title">文件上传</td>
        <td width="4"><img src="image/zz_title_right.gif" width="4" height="23"></td>
      </tr>
    </table>
      <table width="100%" height="100%" border="0" cellpadding="0" cellspacing="0">
        <tr>
          <td width="1" bgcolor="#86c2f1"></td>
          <td valign="top" bgcolor="#FFFFFF"><table width="98%" border="0" align="center" cellpadding="0" cellspacing="0">
              <tr>
                <td height="8"></td>
              </tr>
              <tr>
                <td><table width="100%"  border="0" cellspacing="0" cellpadding="0">
                  <tr>
                    <td width="150" height="22" style='background:url(image/button_bg2.gif)  no-repeat;  width:150px; height:22px; float:left;'>
                   		<a href="#"><span id="spanButtonPlaceholder"></span></a>
                    </td>
					<td width="2"></td>
					<td width="75" height="22" class="button" >
					 	<a href="#" onclick="startUploadFile()" id="btnUpload" class="button_text">文件上传</a>
					</td>
                    <td width="10"></td>
                    <td width="350"></td>
                    <td  height="22" class="button" ><a href="#" onclick="javascript:test();" style="cursor:hand;" class="button_text">确定</a></td>
                  </tr>
                </table></td>
              </tr>
              <tr>
                <td height="8"></td>
              </tr>
              <tr>
                <td><table width="100%" border="0" cellpadding="0" cellspacing="0" class="list_title1">
                    <tr>
                      <td><table width="750" border="0" cellspacing="0" cellpadding="0">
                          <tr>
                            <td width="350" align="center" class="list_title2">文件名</td>
							<td width="120" align="center" class="list_title2">状态</td>
                            <td width="200" align="center" class="list_title2">文件描述</td>
                          </tr>
                      </table></td>
                    </tr>
                  </table>
                    <table width="80" border="0" cellspacing="0" cellpadding="0">
                      <tr>
                        <td class="line"><table width="100%" border="0" cellspacing="0" cellpadding="0">
                            <tr class="text">
                             <td width="4%" height="22" align="center"></td>
								<td width="100%" align="center">
								<input type="hidden" id="fileUpLoads" name="fileUpLoads"/>
								<div id="content">
									<form action="fileUpload.action" method="post" name="thisform" enctype="multipart/form-data">
										<div id="divFileProgressContainer" style="display: none"></div>
										<div id="thumbnails">
											<table id="infoTable" border="0" width="750" style="display: inline; border: solid 1px #7FAAFF; background-color: white; padding: 2px;margin-top:8px;">
											</table>
										</div>
									</form>
								</div>
								</td>
							</tr>
                        </table></td>
                      </tr>
                  </table></td>
              </tr>
            </table>
            <table width="98%"  border="0" align="center" cellpadding="0" cellspacing="0">
              <tr>
                <td height="10"></td>
              </tr>
              <tr>
                <td height="10"></td>
              </tr>
            </table></td>
          <td width="1" bgcolor="#86c2f1"></td>
        </tr>
      </table>
      <table width="100%" border="0" cellpadding="0" cellspacing="0">
        <tr>
          <td width="6" height="6" background="images/right_8.gif"><img src="images/right_7.gif" width="6" height="6"></td>
          <td background="images/right_6.gif" width="100%"></td>
          <td width="6" height="6"><img src="images/right_5.gif" width="6" height="6"></td>
        </tr>
      </table></td>
  </tr>
</table>
	</body>
</html>